//获取元素
var login=document.getElementsByClassName('login')[0];
var user=document.getElementsByClassName('user')[0];
var gouwu=document.getElementsByClassName('gouwu')[0];
var shop=document.getElementsByClassName('shopping')[0];
var headnav=document.getElementsByClassName('head-nav')[0];
var headnava=document.getElementsByClassName('head-nava')[0];
var play=document.getElementsByClassName('play')[0];
var hm=document.getElementsByClassName('hm')[0];
var p=shop.getElementsByTagName('p')[0];
var sousuo=document.getElementsByClassName('sousuo')[0];
var ss=document.getElementsByClassName('ss')[0];
var quxiao=document.getElementsByClassName('quxiao')[0];
//获取localStrage中的数据
var cartList=localStorage.getItem('cartList');
var hy=document.getElementsByClassName('huanying')[0];
var name1=getCookie('name1');
sousuo.onmouseover=function(){
ss.style.display="block";
}
sousuo.onmouseout=function(){
  ss.style.display="none";
}
sousuo.onmouseover=function(){
  ss.style.display="block";
  }
quxiao.onmouseout=function(){
    ss.style.display="none";
  }
user.onmouseover=function(){
  login.style.display="block";
}
user.onmouseout=function(){
  login.style.display="none";
}
gouwu.onmouseover=function(){
  shop.style.display="block";
}
gouwu.onmouseout=function(){
  shop.style.display="none";
}
play.onmouseover=function(){
  headnav.style.display="block";
}
play.onmouseout=function(){
  headnav.style.display="none";
}
hm.onmouseover=function(){
  headnava.style.display="block";
}
hm.onmouseout=function(){
  headnava.style.display="none";
}
  cartList=eval('('+cartList+')')
  p.innerHTML="您的购物车共有"+cartList.length+"件商品";
  hy.innerHTML="欢迎"+"-"+name1;





